-- GENERATED SPELL FOR [Chimaerok] --


function spell0_12800(pUnit, Event) --@Corrosive Venom Spit,n/a--
pUnit:FullCastSpellOnTarget(20629,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12800', 12500, 1)
end

function spell1_12800(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(20627,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12800', 2000, 1)
end

function spell2_12800(pUnit, Event) --@Swoop,n/a--
pUnit:FullCastSpellOnTarget(18144,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12800', 2337, 1)
end

function Sorts_12800(pUnit, Event)
local choix_sorts_12800 = math.random(0, 2)
if choix_sorts_12800 == 0 then
pUnit:RegisterEvent('spell0_12800', 1, 1)
end
if choix_sorts_12800 == 1 then
pUnit:RegisterEvent('spell1_12800', 1, 1)
end
if choix_sorts_12800 == 2 then
pUnit:RegisterEvent('spell2_12800', 1, 1)
end
end

function mob12800_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12800', math.random(1500, 3000), 1)
end

function mob12800_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12800_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12800_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12800, 1, 'mob12800_Action')
RegisterUnitEvent(12800, 2, 'mob12800_Leave')
RegisterUnitEvent(12800, 3, 'mob12800_Kill')
RegisterUnitEvent(12800, 4, 'mob12800_Die')
